<template>
  <div>

    <el-dropdown style="margin-left: 50%">
      <span class="el-dropdown-link" >
        下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown" style="width: 480px; overflow: auto">
        <el-dropdown-item v-for="item in tb1">
          <div style="line-height: 20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.content}}
          </div>
          <div>{{item.createTime}}</div>
        </el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
  import  ddd from  "@/api/news"
  export default {
    name: "test",
    data() {
      return {
        tb1: [],
      }
    },
    mounted() {
      this.getTongzhi()
    },
    methods: {
      getTongzhi() {
        ddd.findByPage({noticeType:1}).then(
          res=>{
            if (res.flag){
              this.tb1 = res.data
            }
          }
        )
      }
    }
  }
</script>

<style scoped>

</style>
